<%- include header.ejs%>
<div style="padding: 50px;min-height: 600px;">
    <div style="background-color: #999966;padding: 30px;word-wrap: break-word;width: 800px;margin: 0 auto">
        <p style="text-align: right">
            <% if (user && user.name == post.name) { %>
            <span><a class="edit" href="/edit/<%= post.name %>/<%= post.time.minute %>/<%= post.title %>">编辑</a></span>
            <span><a class="edit" href="/remove/<%= post.name %>/<%= post.time.minute %>/<%= post.title %>">删除</a></span>
            <% } %>
        </p>
        <p class="info" style="background-color: #217dbb">
            <h3><%= post.title %></h3>
            作者：<a href="/u/<%= post.name %>"><%= post.name%></a>
            日期：<%= post.time.minute%>
            标签：
            <% post.tags.forEach(function (tag, index) { %>
            <% if (tag) { %>
            <a class="tag" href="/tags/<%= tag %>"><%= tag %></a>
            <% } %>
            <% }) %>
        </p>
        <p class="info"><%- post.post %></p>
        <p class="info">阅读：<%= post.pv %> | 评论：<%= post.comments.length %></p>
        <%- include comment.ejs%>
    </div>
</div>
<%- include footer.ejs%>